#include<iostream>
#include<cmath>
using namespace std;
struct Complex
{
    double real;
    double imag;
};

void print(Complex c)
{
    cout<< c.real <<" + " << c.imag <<"i\n";
}

double abscomplex(Complex c)
{
    return sqrt(c.real*c.real+c.imag*c.imag);
}

void init(Complex &c,double r,double i)
{
    c.real=r;
    c.imag=i;
}

int main()
{
    Complex cm1;
    init(cm1,-1.5,2);
    print(cm1);
    cout<<"abs of cm1 is "<<abscomplex(cm1)<<endl;
    return 0;
}